package com.lvmama.rhino.service.impl.comment;

import com.lvmama.rhino.mapperComment.ProductCommentDetailMapper;
import com.lvmama.rhino.pojo.comment.entity.ProductCommentDetail;
import com.lvmama.rhino.service.comment.ProductCommentDetailService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by hejing on 2017/9/20.
 */
@Service("ProductCommentDetailService")
@Transactional
public class ProductCommentDetailServiceImpl implements ProductCommentDetailService {
    private Logger log = Logger.getLogger(ProductCommentDetailServiceImpl.class);
    @Autowired
    private ProductCommentDetailMapper productCommentDetailMapper;

    @Override
    public List<ProductCommentDetail> selectGoodViewpoint(ProductCommentDetail productCommentDetail, Long productId,
                                                          String beginDate, String endDate, String categoryId) {
        List<ProductCommentDetail> productCommentDetails = productCommentDetailMapper.selectGoodViewpoint(productId,
                beginDate, endDate, categoryId);
        return productCommentDetails;
    }

    @Override
    public List<ProductCommentDetail> selectBadViewpoint(ProductCommentDetail productCommentDetail, Long productId,
                                                         String beginDate, String endDate, String categoryId) {
        List<ProductCommentDetail> productCommentDetails = productCommentDetailMapper.selectBadViewpoint(productId,
                beginDate, endDate,categoryId);
        return productCommentDetails;
    }

    @Override
    public List<ProductCommentDetail> selectAllViewpoint(Integer flag) {
        List<ProductCommentDetail> productCommentDetails = productCommentDetailMapper.selectAllViewpoint(flag);
        return productCommentDetails;
    }


}
